package simbolos;

import java.util.ArrayList;

public class ArrayTS {
	private ArrayList<TablaSimbolos> tsArray;
	private int nivelMax;
	
	public ArrayTS(){
		tsArray = new ArrayList<TablaSimbolos>();
		tsArray.add(new TablaSimbolos());
		nivelMax = 0;
	}

	public ArrayList<TablaSimbolos> dameTsArray() {
		return tsArray;
	}
	
	public TablaSimbolos dameTs(int nivel) {
		return tsArray.get(nivel);
	}
	
	public void ponTS() {
		TablaSimbolos ts = new TablaSimbolos();
		ts.creaTS();
		tsArray.add(ts);
		nivelMax++; 
	}

	public void ponTsArray(ArrayList<TablaSimbolos> tsArray) {
		this.tsArray = tsArray;
	}

	public int dameNivelMax() {
		return nivelMax;
	}

	public void ponNivelMax(int nivelMax) {
		this.nivelMax = nivelMax;
	}
	
	public void incrementaNivelTS() {
		this.nivelMax++;
	}
}

